home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / usedhtml / completesource.exe / UsingDHTML / AppG / APPGEX06.VBS < prev    next >
Encoding:
Text File  |  1997-09-07  |  928 b   |  36 lines

  1.  
  2. sub initFilter(objSelFilt)
  3. 'main sub routine
  4.   dim strImageloc, strFilter
  5.   strImageloc = " "
  6.   strFilter = buildFilter(objSelFilt)
  7.   strImageloc = getImage(grapinput)
  8.   changetxt.innerHTML = textinput.value & "<BR>" & strImageloc 
  9.   changetxt.style.filter = strFilter
  10. end sub
  11.  
  12. function buildFilter(objSelFilt)
  13. 'checks for filters than make them part of the string
  14.   for i = 0 to (objSelFilt.length -1)
  15.     if objSelFilt.options(i).selected = True then 
  16.       buildFilter = buildFilter & _ 
  17.                     objSelFilt.options(i).value & " "
  18.     end if
  19.   next
  20. end function
  21.  
  22. function getImage(grapinput)
  23. 'checks for an image, then passes the HTML back to
  24. 'make an image tag
  25.   if len(grapinput.value) > 4 then
  26.     getImage = "<IMG SRC=" & q & grapinput.value & q & ">"
  27.   else
  28.     getImage = ""
  29.   end if
  30. end function
  31.  
  32. function restFilter(changetxt)
  33. changetxt.style.filter = " "
  34.  
  35. end function
  36.